﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NFine.Domain.Entity.ProductManage;

namespace NFine.Domain.Entity.Biz
{
    public class UserOrderEntity : IEntity<UserOrderEntity>
    {
        public string F_Id { get; set; }
        /// <summary>
        /// 订单号
        /// </summary>
        public string F_OrderCode { get; set; }
        /// <summary>
        /// 会员id
        /// </summary>
        public string F_MemberId { get; set; }
        /// <summary>
        /// 中转中心id
        /// </summary>
        public string F_TransferCenterId { get; set; }
        public string F_ShopId { get; set; }
        /// <summary>
        /// 收货人
        /// </summary>
        public string F_Consignee { get; set; }
        /// <summary>
        /// 联系电话
        /// </summary>
        public string F_ContactNumber { get; set; }
        /// <summary>
        /// 收货地址
        /// </summary>
        public string F_Address { get; set; }
        public string F_ProductId { get; set; }
        public decimal? F_ProductPrice { get; set; }
        public int? F_ProductNumber { get; set; }
        /// <summary>
        /// 订单总额
        /// </summary>
        public decimal? F_TotalMoney { get; set; }
        /// <summary>
        /// 下单时间
        /// </summary>
        public DateTime F_OrderTime { get; set; }    
        public DateTime? F_BackTime { get; set; }
        public int? F_BackMoneyStatus { get; set; }
        /// <summary>
        /// 订单状态(0待处理；1已支付；2已完成；3已取消)
        /// </summary>
        public int? F_OrderStatus { get; set; }
        /// <summary>
        /// 发货状态（0未发货；1已发货；2已退货）
        /// </summary>
        public int? F_SendGoodsStatus { get; set; }
        public DateTime? F_FixTime { get; set; }
        public string F_Remark { get; set; }

        /// <summary>
        /// 是否已回调（0：未回调，1：已回调）
        /// </summary>
        public int? F_IsCallBack { get; set; }
        /// <summary>
        /// 预支付订单号
        /// </summary>
        public string F_PrepaidOrder { get; set; }
        /// <summary>
        /// 是否已支付（0：未支付，1：已支付）
        /// </summary>
        public int? F_IsPay { get; set; }
        /// <summary>
        /// 是否积分抵扣
        /// </summary>
        public bool F_IsUseIntegral { get; set; }
        /// <summary>
        /// 结算标识   0:未结算，1：已结算
        /// </summary>
        public int F_IsBalance { get; set; }

        [NotMapped]
        public List<OrderItemEntity> OrderItems { get; set; }

        //[NotMapped]
        //public string ProductName { get; set; }

        //[NotMapped]
        //public string ProductImageUrl { get; set; }

        //[NotMapped]
        //public string SupplerName { get; set; }

        //[NotMapped]
        //public string SupplerPhone { get; set; }
        //[NotMapped]
        //public decimal? LowestPrice { get; set; }//成本价
        [NotMapped]
        public string TransferCenterName;
    }
}
